//package com.springvn.sample.controller;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.test.context.web.WebAppConfiguration;
//import org.springframework.ui.ModelMap;
//import org.springframework.validation.BindingResult;
//import org.springframework.web.bind.annotation.ModelAttribute;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//
//import com.springvn.sample.persistence.Employee;
//import com.springvn.sample.services.IEmployeeService;;
//
//@Controller
//public class EditEmployeeController {
//	  @Autowired
//	  private IEmployeeService employeeManager;
//	 
//	    @RequestMapping(value = "/", method = RequestMethod.GET)
//	    public String listEmployees(ModelMap map)
//	    {
//	        map.addAttribute("employee", new Employee());
//	        map.addAttribute("employeeList", employeeManager.getAllEmployees());
//	 
//	        return "editEmployeeList";
//	    }
//	 
//	    @RequestMapping(value = "/add", method = RequestMethod.POST)
//	    public String addEmployee(@ModelAttribute(value="employee") Employee employee, BindingResult result)
//	    {
//	        employeeManager.addEmployee(employee);
//	        return "redirect:/";
//	    }
//	 
//	    @RequestMapping("/delete/{employeeId}")
//	    public String deleteEmplyee(@PathVariable("employeeId") Integer employeeId)
//	    {
//	        employeeManager.deleteEmployee(employeeId);
//	        return "redirect:/";
//	    }
//	 
//	    public void setEmployeeManager(IEmployeeService employeeManager) {
//	        this.employeeManager = employeeManager;
//	    }
//}
